3.6.66 \(\int (a+b \sin ^4(c+d x))^p \tan (c+d x) \, dx\) [566]

3.6.66.1 Optimal result
3.6.66.2 Mathematica [B] (warning: unable to verify)
3.6.66.3 Rubi [A] (verified)
3.6.66.4 Maple [F]
3.6.66.5 Fricas [F]
3.6.66.6 Sympy [F(-1)]
3.6.66.7 Maxima [F]
3.6.66.8 Giac [F]
3.6.66.9 Mupad [F(-1)]

3.6.66.1 Optimal result

Integrand size = 21, antiderivative size = 141 \[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1,1+p,2+p,\frac {a+b \sin ^4(c+d x)}{a+b}\right ) \left (a+b \sin ^4(c+d x)\right )^{1+p}}{4 (a+b) d (1+p)}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},1,-p,\frac {3}{2},\sin ^4(c+d x),-\frac {b \sin ^4(c+d x)}{a}\right ) \sin ^2(c+d x) \left (a+b \sin ^4(c+d x)\right )^p \left (1+\frac {b \sin ^4(c+d x)}{a}\right )^{-p}}{2 d} \]

output
1/4*hypergeom([1, p+1],[2+p],(a+b*sin(d*x+c)^4)/(a+b))*(a+b*sin(d*x+c)^4)^ 
(p+1)/(a+b)/d/(p+1)+1/2*AppellF1(1/2,1,-p,3/2,sin(d*x+c)^4,-b*sin(d*x+c)^4 
/a)*sin(d*x+c)^2*(a+b*sin(d*x+c)^4)^p/d/((1+b*sin(d*x+c)^4/a)^p)
 
3.6.66.2 Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(463\) vs. \(2(141)=282\).

Time = 9.51 (sec) , antiderivative size = 463, normalized size of antiderivative = 3.28 \[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\frac {2 \left (-b+\sqrt {-a b}\right ) \left (b+\sqrt {-a b}\right ) (-1+2 p) \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,-\frac {(a+b) \sec ^2(c+d x)}{-b+\sqrt {-a b}},\frac {(a+b) \sec ^2(c+d x)}{b+\sqrt {-a b}}\right ) \cos ^2(c+d x) \left (a+b+\left (a-\sqrt {-a b}\right ) \cot ^2(c+d x)\right ) \left (a+b+\left (a+\sqrt {-a b}\right ) \cot ^2(c+d x)\right ) \sin ^4(c+d x) \left (a+b \sin ^4(c+d x)\right )^p}{(a+b)^2 d p \left (\left (b+\sqrt {-a b}\right ) p \operatorname {AppellF1}\left (1-2 p,1-p,-p,2-2 p,-\frac {(a+b) \sec ^2(c+d x)}{-b+\sqrt {-a b}},\frac {(a+b) \sec ^2(c+d x)}{b+\sqrt {-a b}}\right )-\left (-b+\sqrt {-a b}\right ) p \operatorname {AppellF1}\left (1-2 p,-p,1-p,2-2 p,-\frac {(a+b) \sec ^2(c+d x)}{-b+\sqrt {-a b}},\frac {(a+b) \sec ^2(c+d x)}{b+\sqrt {-a b}}\right )+b (-1+2 p) \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,-\frac {(a+b) \sec ^2(c+d x)}{-b+\sqrt {-a b}},\frac {(a+b) \sec ^2(c+d x)}{b+\sqrt {-a b}}\right ) \cos ^2(c+d x)\right ) (8 a+3 b-4 b \cos (2 (c+d x))+b \cos (4 (c+d x)))} \]

input
Integrate[(a + b*Sin[c + d*x]^4)^p*Tan[c + d*x],x]
 
output
(2*(-b + Sqrt[-(a*b)])*(b + Sqrt[-(a*b)])*(-1 + 2*p)*AppellF1[-2*p, -p, -p 
, 1 - 2*p, -(((a + b)*Sec[c + d*x]^2)/(-b + Sqrt[-(a*b)])), ((a + b)*Sec[c 
 + d*x]^2)/(b + Sqrt[-(a*b)])]*Cos[c + d*x]^2*(a + b + (a - Sqrt[-(a*b)])* 
Cot[c + d*x]^2)*(a + b + (a + Sqrt[-(a*b)])*Cot[c + d*x]^2)*Sin[c + d*x]^4 
*(a + b*Sin[c + d*x]^4)^p)/((a + b)^2*d*p*((b + Sqrt[-(a*b)])*p*AppellF1[1 
 - 2*p, 1 - p, -p, 2 - 2*p, -(((a + b)*Sec[c + d*x]^2)/(-b + Sqrt[-(a*b)]) 
), ((a + b)*Sec[c + d*x]^2)/(b + Sqrt[-(a*b)])] - (-b + Sqrt[-(a*b)])*p*Ap 
pellF1[1 - 2*p, -p, 1 - p, 2 - 2*p, -(((a + b)*Sec[c + d*x]^2)/(-b + Sqrt[ 
-(a*b)])), ((a + b)*Sec[c + d*x]^2)/(b + Sqrt[-(a*b)])] + b*(-1 + 2*p)*App 
ellF1[-2*p, -p, -p, 1 - 2*p, -(((a + b)*Sec[c + d*x]^2)/(-b + Sqrt[-(a*b)] 
)), ((a + b)*Sec[c + d*x]^2)/(b + Sqrt[-(a*b)])]*Cos[c + d*x]^2)*(8*a + 3* 
b - 4*b*Cos[2*(c + d*x)] + b*Cos[4*(c + d*x)]))
 
3.6.66.3 Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.99, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3708, 504, 334, 333, 353, 78}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan (c+d x) \left (a+b \sin ^4(c+d x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (c+d x) \left (a+b \sin (c+d x)^4\right )^pdx\)

\(\Big \downarrow \) 3708

\(\displaystyle \frac {\int \frac {\left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^2(c+d x)}d\sin ^2(c+d x)}{2 d}\)

\(\Big \downarrow \) 504

\(\displaystyle \frac {\int \frac {\left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^4(c+d x)}d\sin ^2(c+d x)+\int \frac {\sin ^2(c+d x) \left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^4(c+d x)}d\sin ^2(c+d x)}{2 d}\)

\(\Big \downarrow \) 334

\(\displaystyle \frac {\left (a+b \sin ^4(c+d x)\right )^p \left (\frac {b \sin ^4(c+d x)}{a}+1\right )^{-p} \int \frac {\left (\frac {b \sin ^4(c+d x)}{a}+1\right )^p}{1-\sin ^4(c+d x)}d\sin ^2(c+d x)+\int \frac {\sin ^2(c+d x) \left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^4(c+d x)}d\sin ^2(c+d x)}{2 d}\)

\(\Big \downarrow \) 333

\(\displaystyle \frac {\int \frac {\sin ^2(c+d x) \left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^4(c+d x)}d\sin ^2(c+d x)+\sin ^2(c+d x) \left (a+b \sin ^4(c+d x)\right )^p \left (\frac {b \sin ^4(c+d x)}{a}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {1}{2},1,-p,\frac {3}{2},\sin ^4(c+d x),-\frac {b \sin ^4(c+d x)}{a}\right )}{2 d}\)

\(\Big \downarrow \) 353

\(\displaystyle \frac {\frac {1}{2} \int \frac {\left (b \sin ^4(c+d x)+a\right )^p}{1-\sin ^4(c+d x)}d\sin ^4(c+d x)+\sin ^2(c+d x) \left (a+b \sin ^4(c+d x)\right )^p \left (\frac {b \sin ^4(c+d x)}{a}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {1}{2},1,-p,\frac {3}{2},\sin ^4(c+d x),-\frac {b \sin ^4(c+d x)}{a}\right )}{2 d}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {\sin ^2(c+d x) \left (a+b \sin ^4(c+d x)\right )^p \left (\frac {b \sin ^4(c+d x)}{a}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {1}{2},1,-p,\frac {3}{2},\sin ^4(c+d x),-\frac {b \sin ^4(c+d x)}{a}\right )+\frac {\left (a+b \sin ^4(c+d x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sin ^4(c+d x)+a}{a+b}\right )}{2 (p+1) (a+b)}}{2 d}\)

input
Int[(a + b*Sin[c + d*x]^4)^p*Tan[c + d*x],x]
 
output
((Hypergeometric2F1[1, 1 + p, 2 + p, (a + b*Sin[c + d*x]^4)/(a + b)]*(a + 
b*Sin[c + d*x]^4)^(1 + p))/(2*(a + b)*(1 + p)) + (AppellF1[1/2, 1, -p, 3/2 
, Sin[c + d*x]^4, -((b*Sin[c + d*x]^4)/a)]*Sin[c + d*x]^2*(a + b*Sin[c + d 
*x]^4)^p)/(1 + (b*Sin[c + d*x]^4)/a)^p)/(2*d)
 

3.6.66.3.1 Defintions of rubi rules used

rule 78
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b 
*c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m 
 + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] 
 &&  !IntegerQ[m] && IntegerQ[n]
 

rule 333
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F 
reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 
0]) && (IntegerQ[q] || GtQ[c, 0])
 

rule 334
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[a^IntPart[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[ 
(1 + b*(x^2/a))^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, p, q}, x] && 
NeQ[b*c - a*d, 0] &&  !(IntegerQ[p] || GtQ[a, 0])
 

rule 353
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] 
 :> Simp[1/2   Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ 
{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
 

rule 504
Int[((a_) + (b_.)*(x_)^2)^(p_)/((c_) + (d_.)*(x_)), x_Symbol] :> Simp[c   I 
nt[(a + b*x^2)^p/(c^2 - d^2*x^2), x], x] - Simp[d   Int[x*((a + b*x^2)^p/(c 
^2 - d^2*x^2)), x], x] /; FreeQ[{a, b, c, d, p}, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3708
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ 
)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x]^2, x]}, Simp[ff^ 
((m + 1)/2)/(2*f)   Subst[Int[x^((m - 1)/2)*((a + b*ff^(n/2)*x^(n/2))^p/(1 
- ff*x)^((m + 1)/2)), x], x, Sin[e + f*x]^2/ff], x]] /; FreeQ[{a, b, e, f, 
p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2]
 
3.6.66.4 Maple [F]

\[\int {\left (a +b \left (\sin ^{4}\left (d x +c \right )\right )\right )}^{p} \tan \left (d x +c \right )d x\]

input
int((a+b*sin(d*x+c)^4)^p*tan(d*x+c),x)
 
output
int((a+b*sin(d*x+c)^4)^p*tan(d*x+c),x)
 
3.6.66.5 Fricas [F]

\[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{4} + a\right )}^{p} \tan \left (d x + c\right ) \,d x } \]

input
integrate((a+b*sin(d*x+c)^4)^p*tan(d*x+c),x, algorithm="fricas")
 
output
integral((b*cos(d*x + c)^4 - 2*b*cos(d*x + c)^2 + a + b)^p*tan(d*x + c), x 
)
 
3.6.66.6 Sympy [F(-1)]

Timed out. \[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\text {Timed out} \]

input
integrate((a+b*sin(d*x+c)**4)**p*tan(d*x+c),x)
 
output
Timed out
 
3.6.66.7 Maxima [F]

\[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{4} + a\right )}^{p} \tan \left (d x + c\right ) \,d x } \]

input
integrate((a+b*sin(d*x+c)^4)^p*tan(d*x+c),x, algorithm="maxima")
 
output
integrate((b*sin(d*x + c)^4 + a)^p*tan(d*x + c), x)
 
3.6.66.8 Giac [F]

\[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{4} + a\right )}^{p} \tan \left (d x + c\right ) \,d x } \]

input
integrate((a+b*sin(d*x+c)^4)^p*tan(d*x+c),x, algorithm="giac")
 
output
integrate((b*sin(d*x + c)^4 + a)^p*tan(d*x + c), x)
 
3.6.66.9 Mupad [F(-1)]

Timed out. \[ \int \left (a+b \sin ^4(c+d x)\right )^p \tan (c+d x) \, dx=\int \mathrm {tan}\left (c+d\,x\right )\,{\left (b\,{\sin \left (c+d\,x\right )}^4+a\right )}^p \,d x \]

input
int(tan(c + d*x)*(a + b*sin(c + d*x)^4)^p,x)
 
output
int(tan(c + d*x)*(a + b*sin(c + d*x)^4)^p, x)